package com.dragee.modules.work.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.dragee.utils.excel.FieldDispose;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 项目
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-04-24 09:40:38
 */
@Data
@TableName("t_competition_project")
@ColumnWidth(40)
public class CompetitionProjectEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @ExcelIgnore
    private Long id;

    /**
     * 比赛主键
     */
    @ExcelIgnore
    private String competitionId;

    /**
     * 具体项目 (街舞一级、街舞二级、啦啦操二级)
     */
    @ExcelProperty(value = "项目")
    @FieldDispose(value = "name")
    private String name;

    /**
     * 项目大类（街舞、啦啦操）
     */
    @ExcelProperty(value = "项目大类")
    @FieldDispose(value = "type")
    private String type;

    /**
     * 运动员最小人数
     */
    @ExcelProperty(value = "运动员最小人数")
    @FieldDispose(value = "athleteSumMin")
    private Integer athleteSumMin;

    /**
     * 运动员最大人数
     */
    @ExcelProperty(value = "运动员最大人数")
    @FieldDispose(value = "athleteSumMax")
    private Integer athleteSumMax;

    /**
     * 报名费
     */
    @ExcelProperty(value = "报名费")
    @FieldDispose(value = "entryPrice")
    private BigDecimal entryPrice;

    /**
     * 创建人
     */
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改人
     */
    @ExcelIgnore
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 修改时间
     */
    @ExcelIgnore
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 排序字段
     */
    @ExcelIgnore
    @TableField(fill = FieldFill.INSERT)
    private Long sort;

    }